package com.reserv.util;

import java.sql.Timestamp;

public class SearchVar {
	private String kind, local;
	private Timestamp rtsDate, rteDate, rsDate, reDate;
	private boolean hasRt, hasR, hasKind, hasLocal;
	

	public SearchVar(
			String kind, String local, Timestamp rtsDate, Timestamp rteDate, 
			Timestamp rsDate, Timestamp reDate) {
		if(!(kind == null || kind.length() == 0 || kind.equals("전체"))) {
			this.kind = kind;
			setHasKind(true);
		}
		if(!(local == null || local.length() == 0 || local.equals("전체"))) {
			this.local = local;
			setHasLocal(true);
		}
		if(rtsDate != null && rteDate != null) {
			this.rtsDate = rtsDate;
			this.rteDate = rteDate;
			setHasRt(true);
		}
		if(rsDate != null && reDate != null) {
			this.rsDate = rsDate;
			this.reDate = reDate;
			setHasR(true);
		}
	}
	public String getKind() {
		return kind;
	}
	public void setKind(String kind) {
		this.kind = kind;
	}
	public String getLocal() {
		return local;
	}
	public void setLocal(String local) {
		this.local = local;
	}
	public Timestamp getRtsDate() {
		return rtsDate;
	}
	public void setRtsDate(Timestamp rtsDate) {
		this.rtsDate = rtsDate;
	}
	public Timestamp getRteDate() {
		return rteDate;
	}
	public void setRteDate(Timestamp rteDate) {
		this.rteDate = rteDate;
	}
	public Timestamp getRsDate() {
		return rsDate;
	}
	public void setRsDate(Timestamp rsDate) {
		this.rsDate = rsDate;
	}
	public Timestamp getReDate() {
		return reDate;
	}
	public void setReDate(Timestamp reDate) {
		this.reDate = reDate;
	}
	public boolean isHasRt() {
		return hasRt;
	}
	public void setHasRt(boolean hasRt) {
		this.hasRt = hasRt;
	}
	public boolean isHasR() {
		return hasR;
	}
	public void setHasR(boolean hasR) {
		this.hasR = hasR;
	}
	public boolean isHasKind() {
		return hasKind;
	}
	public void setHasKind(boolean hasKind) {
		this.hasKind = hasKind;
	}
	public boolean isHasLocal() {
		return hasLocal;
	}
	public void setHasLocal(boolean hasLocal) {
		this.hasLocal = hasLocal;
	}
	@Override
	public String toString() {
		return "SearchVar [kind=" + kind + ", local=" + local + ", rtsDate="
				+ rtsDate + ", rteDate=" + rteDate + ", rsDate=" + rsDate
				+ ", reDate=" + reDate + ", hasRt=" + hasRt + ", hasR=" + hasR
				+ ", hasKind=" + hasKind + ", hasLocal=" + hasLocal + "]";
	}
}
